<?php
// +----------------------------------------------------------------------
// | Amicool-MVC [ Dynamic Flexible Agile Devlepment]
// +----------------------------------------------------------------------
// | Copyright (c) 2015-2020 http://amicool.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 郡笑笙 <iamzjs@126.com>
// +----------------------------------------------------------------------
require 'HomeController.php';
class IndexController extends HomeController{
	function __Construct(){
		parent::__Construct();
	}
	function index(){
		$model = new HomeModel;
		$userlist = $model->getUserList();
		/*var_dump($userlist);
		exit();*/
		$user = $model->getUserByName('zjh');
		$user2 = $model->getUserByID('2');  
         //把文章数据赋给视图模板   
         $this->assign('userlist' , $userlist);  
         $this->assign('teacher',$user);
         $this->assign('student',$user2);
         $this->display();
	}
}
?>